<h1>修改密码</h1>
<div class="row">
  <div class="container">
    <%= form_tag dashboard_update_password_path, method: :put, class: 'form-horizontal', id: "user_form" do %>
      <% unless current_user.errors.blank? %>
        <div class="alert alert-danger">
          <ul>
            <% current_user.errors.messages.values.flatten.each do |error| %>
              <li><%= error %></li>
            <% end -%>
          </ul>
        </div>
      <% end %>

      <div class="form-group">
        <div class="col-lg-12">旧密码 *</div>
        <div class="col-lg-12">
          <%= password_field_tag :old_password, '', class: "form-control" %>
        </div>
      </div>
      <div class="form-group">
        <div class="col-lg-12">密码 *</div>
        <div class="col-lg-12">
          <%= password_field_tag :password, '', class: "form-control" %>
        </div>
      </div>
      <div class="form-group">
        <div class="col-lg-12">密码确认 *</div>
        <div class="col-lg-12">
          <%= password_field_tag :password_confirmation, '', class: "form-control" %>
        </div>
      </div>
      <div class="form-group">
        <div class="col-lg-12">
          <input type="submit" name="create_user_submit" value="保存" class="col-xs-12 btn btn-primary">
        </div>
      </div>
    <% end -%>

  </div>
</div>